package client;

import common.Capabilities;

/**
 * A simple TCP client application. The application connects to a given remote
 * server and sends a given string of text, then waits for the server reply.
 * 
 * @author Eduardo Marques
 */
public class PISTClient {
    /**
     * Entry point for the program.
     * 
     * @param args
     *            Program arguments
     * @throws Exception
     *             if an error occurs.
     */
    public static void main(String[] args) throws Exception {
        // Remote host and port variables.
        String serverAddr = args[0];
        int serverPort = Integer.parseInt(args[1]);

        // // Message to send.
        // String request = args[2];

        // Create connection to server.
        ClientConnection connection = new ClientConnection(serverAddr,
                serverPort);
        // Define client Capabilities;
        Capabilities[] able = { Capabilities.TEXT, Capabilities.IMAGE };
        connection.sendLogin(args[2], able);

    }
}
